interface IDog{
    readonly name:string; //只读
    age:number; //必填
    foot?:string|number; //可选 string 和 number 的联合属性
}

// type CreateDog = (name:string,age:number,foot?:string|number) => IDog;

type aa = (name:string,age:number,foot?:string|number)=> IDog

const createDog:aa=(name,age,foot)=>{
    return {
        name,
        age,
        foot
    }
}


type paixu=(arr:string[])=>string[]
const quchong:paixu=(arr)=>{
    return [...new Set(arr)]
}

const arr1 = ["apple", "banana", "orange", "apple", "banana","apple", "banana", "orange", "apple", "banana"]
const Arr = quchong(arr1)
console.log(Arr);


enum meiju{
    a = 100,
    b,
    c,
}


// 使用类型断言把number类型的变量a赋值给string类型的变量b
let a:number = 42;
let b:string;
b = <never>a

